package com.lsu.chain.experiment;

/**
 * 西施
 *
 * @Author wang suo
 * @Date 2020/11/26 0026 20:56
 * @Version 1.0
 */
public class XiShi extends AbstractChain {
    @Override
    public void handlerRequest(String[] request) {
        setMax("西施");
        setNum(Integer.parseInt(request[0]));
        if ("12".equals(request[0])) {
            System.out.println("西施是猪");
        } else {
            if (getNext() != null) {
                getNext().handlerRequest(request);
            } else {
                System.out.println("游戏结束,没有人是猪!");
            }
        }
    }
}
